package test2;

public class demo74 {
/*    *//**
     * Definition for singly-linked list.
     * public class ListNode {
     *     int val;
     *     ListNode next;
     *     ListNode(int x) {
     *         val = x;
     *         next = null;
     *     }
     * }
     *//*
    public class Solution {
        public ListNode getIntersectionNode(ListNode headA, ListNode headB) {
            ListNode A = headA,B = headB;
            while(A!=B)
            {
                A = A!=null? A.next:headB;
                B = B!=null? B.next:headA;
            }
            return A;
        }
    }*/
}
